/**
 *Copyright (c) 2003, 2018, UMF and/or its affiliates. All rights reserved.
 */
package com.umf.b2b.model.pay;

import com.umf.b2b.MerchantBaseRequest;
import com.umpay.dto.UMFResponse.Message;
import com.umpay.util.UMFUtil;

/**
<p>Title:ConsumeBalance</p>  
<p>Description:���֧��</p>
 */
public class ConsumeBalance extends MerchantBaseRequest{
	
	private String notify_url;
	private String mer_trace;//*����ش���[��Ӧ����] �̻�֧����ˮ��,�̻�ƽ̨���ɵı�ʶ�ñ�֧�����׵���ˮ�ţ�����ˮ�����̻�ƽ̨�б���Ψһ
	private String trade_no;//*����ش���[��Ӧ����] ��������ƽ̨���������󷵻ص�����ƽ̨��ˮ��
	private String user_id;//*����ش��� �̻����̻�����������ƽ̨�����ɹ����������ص����̻�Ψһ���
	private String amount;//*����ش���[��Ӧ����] ֧�����
	private String remark;
	private String url = "/consume/balance";
	
	private String settle_amt;//[��Ӧ����] ������
	private String mer_check_date;//[��Ӧ����] �������� ƽ̨�������ڣ���ʽ��YYYYMMDD

	@Override
	public String getRequestUrl() {
		return baseUrl + url;
	}

	@Override
	public ConsumeBalance doRequest() throws Exception {
		Message<ConsumeBalance> response = UMFUtil.post(createAPIContext(), this,ConsumeBalance.class);
		MerchantBaseRequest baseResult = convertResult(response, ConsumeBalance.class);
		if(baseResult == null)
			return null;
		return (ConsumeBalance)baseResult;
	}

	public String getMer_id() {
		return mer_id;
	}

	public void setMer_id(String mer_id) {
		this.mer_id = mer_id;
	}

	public String getNotify_url() {
		return notify_url;
	}

	public void setNotify_url(String notify_url) {
		this.notify_url = notify_url;
	}

	public String getMer_trace() {
		return mer_trace;
	}

	public void setMer_trace(String mer_trace) {
		this.mer_trace = mer_trace;
	}

	public String getTrade_no() {
		return trade_no;
	}

	public void setTrade_no(String trade_no) {
		this.trade_no = trade_no;
	}

	public String getAmount() {
		return amount;
	}

	public void setAmount(String amount) {
		this.amount = amount;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getUser_id() {
		return user_id;
	}

	public void setUser_id(String user_id) {
		this.user_id = user_id;
	}

	public String getSettle_amt() {
		return settle_amt;
	}

	public void setSettle_amt(String settle_amt) {
		this.settle_amt = settle_amt;
	}

	public String getMer_check_date() {
		return mer_check_date;
	}

	public void setMer_check_date(String mer_check_date) {
		this.mer_check_date = mer_check_date;
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("ConsumeBalance [mer_id=");
		builder.append(mer_id);
		builder.append(", notify_url=");
		builder.append(notify_url);
		builder.append(", mer_trace=");
		builder.append(mer_trace);
		builder.append(", trade_no=");
		builder.append(trade_no);
		builder.append(", user_id=");
		builder.append(user_id);
		builder.append(", amount=");
		builder.append(amount);
		builder.append(", remark=");
		builder.append(remark);
		builder.append(", url=");
		builder.append(url);
		builder.append(", settle_amt=");
		builder.append(settle_amt);
		builder.append(", mer_check_date=");
		builder.append(mer_check_date);
		builder.append(", version=");
		builder.append(version);
		builder.append(", ret_code=");
		builder.append(ret_code);
		builder.append(", ret_msg=");
		builder.append(ret_msg);
		builder.append(", links=");
		builder.append(links);
		builder.append("]");
		return builder.toString();
	}
}
